package model

type RoleIdBlock struct {
	RoleId int64 `gorm:"column:role_id" json:"role_id"`
}

type CmsAdminUsers struct {
	ID        int64  `gorm:"primary_key" json:"-"`
	Name      string `gorm:"column:name" json:"name"`
	Password  string `gorm:"column:password" json:"password"`
	Avatar    string `gorm:"column:avatar" json:"avatar"`
	LoginIp   string `gorm:"column:login_ip" json:"login_ip"`
	CreatedAt string `gorm:"column:created_at" json:"created_at"`
	LoginAt   string `gorm:"column:login_at" json:"login_at"`
}

func (CmsAdminUsers) TableName() string {
	return "cms_admin_users"
}

type CmsAdminRoles struct {
	ID        int64  `gorm:"primary_key" json:"-"`
	Name      string `gorm:"column:name" json:"name"`
	CreatedAt string `gorm:"column:created_at" json:"created_at"`
	UpdatedAt string `gorm:"column:updated_at" json:"updated_at"`
}

func (CmsAdminRoles) TableName() string {
	return "cms_admin_roles"
}

type CmsAdminPermissions struct {
	ID        int64  `gorm:"primary_key" json:"-"`
	Name      string `gorm:"column:name" json:"name"`
	Pid       int64  `gorm:"column:pid" json:"pid"`
	Path      string `gorm:"column:path" json:"path"`
	IsShow    int64  `gorm:"column:is_show" json:"is_show"`
	CreatedAt string `gorm:"column:created_at" json:"created_at"`
	UpdatedAt string `gorm:"column:updated_at" json:"updated_at"`
}

func (CmsAdminPermissions) TableName() string {
	return "cms_admin_permissions"
}

type CmsAdminRoleHasPermissions struct {
	ID           int64  `gorm:"primary_key" json:"-"`
	RoleId       int64  `gorm:"column:role_id" json:"role_id"`
	PermissionId int64  `gorm:"column:permission_id" json:"permission_id"`
	CreatedAt    string `gorm:"column:created_at" json:"created_at"`
}

func (CmsAdminRoleHasPermissions) TableName() string {
	return "cms_admin_role_has_permissions"
}

type CmsAdminUserHasRoles struct {
	ID        int64  `gorm:"primary_key" json:"-"`
	AdminId   int64  `gorm:"column:admin_id" json:"admin_id"`
	RoleId    int64  `gorm:"column:role_id" json:"role_id"`
	CreatedAt string `gorm:"column:created_at" json:"created_at"`
}

func (CmsAdminUserHasRoles) TableName() string {
	return "cms_admin_user_has_roles"
}

type CmsAdminOptionLog struct {
	ID        int64  `gorm:"primary_key" json:"-"`
	UserName  string `gorm:"column:user_name" json:"user_name"`
	UserId    int64  `gorm:"column:user_id" json:"user_id"`
	Path      string `gorm:"column:path" json:"path"`
	Method    string `gorm:"column:method" json:"method"`
	Option    string `gorm:"column:option" json:"option"`
	CreatedAt string `gorm:"column:created_at" json:"created_at"`
}

func (CmsAdminOptionLog) TableName() string {
	return "cms_admin_option_log"
}

type CmsBurstRecord struct {
	ID             int64  `gorm:"primary_key" json:"-"`
	Uid            int64  `gorm:"column:uid" json:"uid"`
	TempFolderName string `gorm:"column:temp_folder_name" json:"temp_folder_name"`
	FileName       string `gorm:"column:file_name" json:"file_name"`
	FileTotalSize  string `gorm:"column:file_total_size" json:"file_total_size"`
	BurstCount     int64  `gorm:"column:burst_count" json:"burst_count"`
	BurstTotal     int64  `gorm:"column:burst_total" json:"burst_total"`
	CreatedAt      string `gorm:"column:created_at" json:"created_at"`
}

func (CmsBurstRecord) TableName() string {
	return "cms_burst_record"
}
